﻿using System.Windows.Forms;
using Finance.Data;

namespace Finance.Views
{
	public partial class NoteView : UserControl
	{
		private Note _note;

		public NoteView()
		{
			InitializeComponent();
		}

		public Note Note
		{
			get { return _note; }
			set
			{
				_note = value;
				if (_note != null)
					_textBoxNotes.Text = _note.Text;
			}
		}

		public void Apply()
		{
			if (Note == null)
				return;

			Note.Text = _textBoxNotes.Text;
		}
	}
}
